<template>
  <van-dropdown-menu>
    <van-dropdown-item
      :title="value2 ? optionObj[value2] : '筛选'"
      v-model="value2"
      :options="option2"
      @change="handleFilterMenu"
    />
  </van-dropdown-menu>
</template>

<script>
export default {
  name: 'comFilterMenu',
  props: {
    rightOption: Array,
    rightOptionObj: Object,
    rightValue: String
  },
  data() {
    return {
      value1: '',
      value2: this.rightValue,
      option1: [],
      option2: this.rightOption,
      optionObj: this.rightOptionObj
    }
  },

  methods: {
    handleFilterMenu(val) {
      this.$emit('getFilterMenuValue', val)
    }
  }
}
</script>

<style scoped></style>
